<?php
/**
 * Created by PhpStorm.
 * User: C。
 * Date: 2019/8/13
 * Time: 9:04
 */
namespace app\home\controller;

use app\common\model\GoodsOption as GoodsOptionModel;

/**
 * 禅旅规格控制器
 * Class Goodsoption
 * @package app\home\controller
 */
class Goodsoption extends Base
{
    /**
     * [getIndex  列表]
     * @param
     * @return json
     * @author [C。]
     */
    public function Index()
    {
        $param = input('param.');
        $model = new GoodsOptionModel();
        $map = [];

        try {
            $map['status'] = 1;
            $map['goodsid'] = $param['goodsid'];
            $option = $model->getAllData($map,'id','id,person_num,marketprice,day');
        }catch(\Exception $e){
            systembug($e->getMessage(),2,$this->url);
            return admin_json(-1, '获取失败'.$e->getMessage());
        }
        return admin_json(1,'获取成功',$option);
    }
}